<?php

require_once('db_connection.php');

  pr($_GET);

  // if set in URL then update
  if(isset($_GET['id'])) {
    $id = $_GET['id'];
  } else {
    header('location:http://localhost/try/show_all_users.php');
    exit;
  }

  $user = fetchById('users',$id);
  pr($user);
?>
<link href="../html/css/site.css" rel="stylesheet" type="text/css" />

<table border="0" width="80%" align="center"cellspacing ="0">
  <thead>
    <tr>
      <th colspan="2">::User Details::

<a href="edit_user.php?id=<?=$id?>">
Edit
</a>


</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="right">Name :</td>
      <td><?=$user['name']?></td>
    </tr>
    <tr>
      <td align="right">Email :</td>
      <td><?=$user['email']?></td>
    </tr>
    <tr>
      <td align="right">Added date :</td>
      <td><?=$user['added_date']?></td>
    </tr>
    <tr>
      <td align="right">Modified Date :</td>
      <td><?=$user['modified_date']?></td>
    </tr>
    <tr>
      <td align="right">Status :</td>
      <td><?=getStatus($user['status'])?></td>
    </tr>
  </tbody>
</table>



